package com.longrise.android.byjk.plugins.poster.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import java.util.List;

/**
 * Created by Administrator on 2017/9/26.
 */

public class PosterFragmentAdapter extends FragmentPagerAdapter {

    private List<Fragment> list;
    private List<String> areaList;

    public PosterFragmentAdapter(FragmentManager fm, List<Fragment> list, List<String> areaList) {
        super(fm);
        this.list = list;
        this.areaList = areaList;
    }

    @Override
    public int getCount() {
        return list.size();
    }

    @Override
    public Fragment getItem(int position) {
        return list.get(position);
    }

    @Override
    public CharSequence getPageTitle(int position) {
        return areaList.get(position);
    }

}
